package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotEmpty;

/**
 * 发送消息对象 t_mess_send
 * 
 * @author wp
 * @date 2023-08-10
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@TableName(value = "t_mess_send", excludeProperty = {"updateTime","updateBy","remark"})
public class MessSend extends BaseEntity {

    /** id */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /** 消息标题 */
    @ApiModelProperty("消息标题")
    private String title;

    /** 内容 */
    @ApiModelProperty("内容")
    private String content;

    /** 接收人id */
    @ApiModelProperty("接收人ID，英文逗号隔开")
    private String receiveUserId;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("发送时间")
    private Date sendTime;

    /** 是否已发送 0否1是 */
    @ApiModelProperty("是否已发送 0否1是")
    private Integer isSend;

    /** 消息类型0系统消息1通知消息2案件消息3报警消息 */
    @ApiModelProperty("消息类型（0系统消息1通知消息2案件消息3报警消息）")
    private Long messType;

    /** 是否已读 0否1是 */
    @ApiModelProperty("是否已读（0否1是）")
    private Integer isRead;

    /** 消息传参 */
    @ApiModelProperty("消息传参")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject msgParam;

    /** 是否删除0否1是 */
    @ApiModelProperty("是否删除（0否1是）")
    private Integer isDel;

    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    @JsonIgnore
    private String startTime;
    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    @JsonIgnore
    private String endTime;
    @TableField(exist = false)
    private String createUserName;
    @TableField(exist = false)
    private String receiveUserNames;

    /** 消息接收情况 */
    @ApiModelProperty("消息接收情况")
    @TableField(exist = false)
    private List<MessReceive> messReceiveList;
}
